#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

bool CheckPermutation(char* s1, char* s2);

int main()
{
	return 0;
}

bool CheckPermutation(char* s1, char* s2)
{
	char freq[26] = { 0 }, ch1 = s1[0], ch2 = s2[0];
	for (int i = 0; ch1 && ch2; i++, ch1 = s1[i], ch2 = s2[i]) {
		freq[ch1 - 'a']++;
		freq[ch2 - 'a']--;
	}

	if (ch1 || ch2) return false;
	for (int i = 0; i < 26; i++)
		if (freq[i]) return false;
	return true;
}
